﻿using IM.Easy.Entity.Log;
using IM.Easy.Infrastructure.Query;
using IM.Easy.LogServices.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IM.Easy.LogServices.IServices
{
    /// <summary>
    /// 异常日志服务
    /// </summary>
    public interface IExceptionLogService
    {
        /// <summary>
        /// 写入异常日志
        /// </summary>
        SysExceptionLog Insert(SysExceptionLog exceptionLog);

        /// <summary>
        /// 日志查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PageResponse<ExceptionLogDto> GetList(ExceptionLogQueryDto query);

        /// <summary>
        /// 根据 ID 删除实体
        /// </summary>
        /// <param name="id">要删除的实体的唯一标识</param>
        /// <returns>操作是否成功</returns>
        bool Delete(params Guid[] id);

        /// <summary>
        /// 根据 ID 获取实体
        /// </summary>
        /// <param name="id">实体的唯一标识</param>
        /// <returns>获取的实体</returns>
        SysExceptionLog GetById(Guid id);
    }
}
